#pragma once
/*
This class is the base class for all of the entities in the game (apart from basic terrain features).  
E.g:  The player character, the mobs, altars, fountains, stairs.
*/
#include "Location.h"
#include "Map.h"
#include "Input.h"
#include "Colors.h"

class Entity
{
private:
	//Identification
	static int m_nextID;
	int m_ID;				//A unique ID number
protected:
	//Drawing
	char m_icon;			//The icon of the entity
	char m_color;			//The color of the icon
	bool m_redrawEntity;	//Do we need to redraw the entity this turn?
	//Positioning
	Location m_Location;	//The location of the entity on the map
	Map * m_Map;			//A pointer to the map, so the entity knows about where it is
public:
	//Constructor/Destructors
	Entity();
	~Entity();
	//Game Loop Methods
	virtual void handleInput(int a_input);	//@param:  The latest keyboard input
	virtual void update();
	void draw();
	void redraw();					//A request to redraw the entity
	//Other Methods
	void setMapData(Map * a_Map);
	virtual void place(Location a_Location);
	virtual void spawn();					//Randomly places the entity in a random, VALID (ie. Not in a wall) space
};